export default {
  //  判断当前菜单栏展开还是缩进
  ToggleSideBar ({commit}, payload) {
    commit('TOGGLE_SIDEBAR');
  },
  //  获取url
  geturl ({commit}, data) {
    commit('GETURL', data);
    // window.sessionStorage.setItem('data', data);
  },
  addVisitedViews ({commit}, view) {
    commit('ADD_VISITED_VIEWS', view);
  },
  delVisitedViews ({commit, state}, view) {
    return new Promise((resolve) => {
      commit('DEL_VISITED_VIEWS', view);
      resolve([...state.visitedViews]);
    });
  },
  changeloadstate ({commit}) {
    commit('CHANGELOADSTATE');
  },
  //  detail
  // updatedetail ({commit}, detail) {
  //   commit('UPDATEDETAIL', detail);
  // },
  //  loading显示
  showloader ({commit}) {
    commit('SHOWLOADING');
  },
  hideloader ({commit}) {
    commit('HIDELOADING');
  },
  //  中英文切换
  setLanguage ({commit}, language) {
    commit('SET_LANGUAGE', language);
  },
  //  车辆位置
  local ({commit}, data) {
    commit('LOCAL', data);
  },
  //  路线
  sprinkler ({commit}, data) {
    commit('SPRINKLER', data);
  }
};
